// 分模块
const userModules = {
  // 别忘了开启命名空间哈
  namespaced: true,
  state () {
    return {
      token: '',
      refreshToken: '',
      //  创建一个对象用来储存个人信息
      isObj: {}
    }
  },
  mutations: {
    setToken (state, token) {
      state.token = token
    },
    setRefreshToken (state, refreshToken) {
      state.refreshToken = refreshToken
    },
    setUser (state, obj) {
      state.isObj = { ...state.isObj, ...obj }
    }
  },
  actions: {

  }

}
// 最后在导出模块到根模块下使用哈
export default userModules
